﻿namespace YiShop.System.Controllers
{
    [Route("system/dept")]
    public class SysDeptController : ControllerBase
    {
        private readonly SysDeptService _sysDeptService;
        public SysDeptController(SysDeptService sysDeptService)
        {
            _sysDeptService = sysDeptService;
        }
        /// <summary>
        /// 查询部门表列表
        /// </summary>
        [HttpGet("list")]
        public async Task<AjaxResult> GetSysDeptList([FromQuery] SysDeptDto dto)
        {
            var data = await _sysDeptService.GetDtoListAsync(dto);
            return AjaxResult.Success(data);
        }
    }
}